/**
 * f-club.cn
 * Copyright (c) 2009-2012 All Rights Reserved.
 */
package com.mjee.app.domain;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotEmpty;

/**
 * 
 * @author michael
 * @version $Id: User.java, v 0.1 2012-8-1 下午2:42:49 michael Exp $
 */
public class User extends PrimaryKey {

    /** serial version UID */
    private static final long serialVersionUID = 6138368944475768069L;
    
    @NotEmpty
    @Size(max = 20)
    private String name;
    @NotEmpty
    @Size(min = 8, max = 20)
    private String password;
    @NotNull
    @Email
    private String email;
    
    @Valid
    private UserDetail userDetail;
    
    
    // ---- getter/setter methods ------------------------------------
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public String getPassword() {
        return password;
    }
    
    public void setPassword(String password) {
        this.password = password;
    }
    
    public String getEmail() {
        return email;
    }
    
    public void setEmail(String email) {
        this.email = email;
    }
    
    public UserDetail getUserDetail() {
    	return userDetail;
    }
    
    public void setUserDetail(UserDetail userDetail) {
		this.userDetail = userDetail;
	}
    
}
